package com.buss.customer.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.codehaus.jackson.annotate.JsonIgnoreType;
import org.codehaus.jackson.map.annotate.JsonSerialize;



/**
 * 客户/供应商联系人信息
 * @author gykl
 *
 */
@Entity
@Table(name = "customer_contacts")
@TableGenerator(name="contacts_pk_sequence",initialValue=1,allocationSize=1,pkColumnName="seq_col",
	pkColumnValue="contacts_seq",valueColumnName="seq_val",table="customer_pk_sequence")
public class CustomerContacts implements Serializable {

	private static final long serialVersionUID = -3725076522136853697L;

	/**联系人ID*/
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator="contacts_pk_sequence")
	private Long id;
	
	/**客户/供应商ID*/
	@Column(nullable=false)
	private Long customerId;
	
	/**联系人姓名*/
	@Column(length=20,nullable=false)
	private String name;
	
	/**称呼*/
	@Enumerated(EnumType.STRING)
	
	private Salutation salutation;
	
	/**移动电话*/
	@Column(length=20)
	private String mobile;
	
	/**家庭电话*/
	@Column(length=20)
	private String familyPhone;
	
	/**单位电话*/
	@Column(length=20)
	private String companyPhone;
	
	/**单位传真*/
	@Column(length=20)
	private String companyFax;
	
	/**QQ号码*/
	@Column(length=20)
	private String qq;
	
	/**MSN号码*/
	@Column(length=20)
	private String msn;
	
	/**阿里旺旺号码*/
	@Column(length=20)
	private String aliww;
	
	/**备注*/
	@Column(length=254)
	private String intro;
	
	
	public Long getId() {
		return id;
	}




	public void setId(Long id) {
		this.id = id;
	}




	public Long getCustomerId() {
		return customerId;
	}




	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}




	public String getName() {
		return name;
	}




	public void setName(String name) {
		this.name = name;
	}




	public Salutation getSalutation() {
		return salutation;
	}




	public void setSalutation(Salutation salutation) {
		this.salutation = salutation;
	}




	public String getMobile() {
		return mobile;
	}




	public void setMobile(String mobile) {
		this.mobile = mobile;
	}




	public String getFamilyPhone() {
		return familyPhone;
	}




	public void setFamilyPhone(String familyPhone) {
		this.familyPhone = familyPhone;
	}




	public String getCompanyPhone() {
		return companyPhone;
	}




	public void setCompanyPhone(String companyPhone) {
		this.companyPhone = companyPhone;
	}




	public String getCompanyFax() {
		return companyFax;
	}




	public void setCompanyFax(String companyFax) {
		this.companyFax = companyFax;
	}




	public String getQq() {
		return qq;
	}




	public void setQq(String qq) {
		this.qq = qq;
	}




	public String getMsn() {
		return msn;
	}




	public void setMsn(String msn) {
		this.msn = msn;
	}




	public String getAliww() {
		return aliww;
	}




	public void setAliww(String aliww) {
		this.aliww = aliww;
	}




	public String getIntro() {
		return intro;
	}




	public void setIntro(String intro) {
		this.intro = intro;
	}




	/**称呼*/
	public enum Salutation{
		lady("女士"),
		man("先生");
		private String value;
		Salutation(String value){
			this.value = value;
		}
		public String getValue(){
			return value;
		}
	}
}
